<h1>Listing roomtypes</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Num beds</th>
    <th>Has tv</th>
    <th>Has refrigerator</th>
    <th>Has aircon</th>
    <th>Has fan</th>
    <th>Has bathroom</th>
    <th>Has bathtube</th>
    <th>Has hotwater</th>
	<th>Price(per day)</th>
  </tr>

<% @roomtypes.each do |roomtype| %>
  <tr>
    <td><%=h roomtype.name %></td>
    <td><%=h roomtype.num_beds %></td>
    <td><%=h roomtype.has_tv %></td>
    <td><%=h roomtype.has_refrigerator %></td>
    <td><%=h roomtype.has_aircon %></td>
    <td><%=h roomtype.has_fan %></td>
    <td><%=h roomtype.has_bathroom %></td>
    <td><%=h roomtype.has_bathtube %></td>
    <td><%=h roomtype.has_hotwater %></td>
	<td><%=h roomtype.price%></td>
    <td><%= link_to 'Show', roomtype %></td>
    <td><%= link_to 'Edit', edit_roomtype_path(roomtype) %></td>
    <td><%= link_to 'Destroy', roomtype, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New roomtype', new_roomtype_path %>
<%= link_to 'back', :controller => "home" %>